from fastapi import APIRouter, Depends, HTTPException, Response

from dependencies import get_current_admin_user
from schemas.goods import GoodsPydantic
from services.order.goods import GoodsService

router = APIRouter(
    prefix="/goods",
    tags=["Internal Goods"],
    dependencies=[Depends(get_current_admin_user)],
    responses={404: {"description": "Not found"}},
)


@router.post("/create")
async def create_goods(data: GoodsPydantic):
    await GoodsService.create_goods(data.dict())
    return {"data": "success"}